home *** CD-ROM | disk | FTP | other *** search
/ Mac100% 1998 November / MAC100-1998-11.ISO.7z / MAC100-1998-11.ISO / オンラインソフト定点観測 / ユーティリティ / HexKey 1.0.1.sit / GSU-HexKey / Hex Key - Read Me < prev    next >
Text File  |  1998-08-01  |  4KB  |  94 lines

  1. RELEASE NOTES FOR HEX KEY
  2.  
  3.  
  4. Wheels within wheels...
  5.  
  6. For me, this is a development tool for a development tool for the
  7. ultimate software in development. To add to the irony, this pet was
  8. spawned by its own development tool. It seems comical at times, but,
  9. very often, the easiest way to test the worth a complicated algorithm
  10. is with a somewhat less complicated algorithm... Think about it: even
  11. if you really _do_ know how to build a foundry (few do (grin)), in
  12. isolation you would have to build a forge before you could have any
  13. hope of making the tools you would need to make a foundry...
  14.  
  15. But: this is a reasonably useful tool for everyday use as well.
  16.  
  17. Like everyone in the universe of 'user-friendly' computing, I am
  18. awash in hexadecimal numbers. The projects I'm working on make heavy
  19. use of some clever and oblique fixed-point encoding schemes: the
  20. FOND unit and the Fixed and Fract formats. I am really, really sick
  21. of converting numbers into and out of these formats, hence Hex Key.
  22.  
  23. What Hex Key does is this: it presents a dialog into which you can
  24. enter either decimal or hexadecimal numbers, selectable by radio
  25. button. After you hit "Okay", or the return or enter keys, the
  26. numbers will be converted to the appropriate values in the
  27. alternative number formats. In other words, if you enter a hex value,
  28. the number will be converted to its appropriate form in FOND, Fixed
  29. and Fract decimal. If you enter a decimal number, it will be shown in
  30. FOND, Fixed and Fract hex. Where a number falls outside the range of
  31. the format, the text "N/A" is shown, so you don't act upon a bogus
  32. number. For convenience, seven other formats are shown: signed and
  33. unsigned longs, shorts and bytes are shown for reference (with
  34. decimal values rounded toward zero), and the ASCII characters are
  35. shown for values that fall within the ASCII range.
  36.  
  37. Decimal numbers can be entered in floating point form (necessarily).
  38. Hexadecimal must be entered as unsigned integers. Spaces are allowed,
  39. so you can Paste from a hex editor. It is not necessary to format hex
  40. numbers as "0xFF71", although you can if you like.
  41.  
  42. That's really it, honest. CMD-C, CMD-X and CMD-V work, but their
  43. respective menu items are disabled because this really _is_ a dialog,
  44. and we're obeying the rules. Hex Key is compatible with both Systems
  45. 6 and 7, is 32-bit clean and multi-finder aware. It does not,
  46. however, feature the sleek and understated Movado Museum watch
  47. cursor.
  48.  
  49.  
  50. Number formats...
  51.  
  52. FOND: The Apple FOND resource uses a two-byte short integer to
  53. represent font metrics (e.g., ascent, descent, leading, widths, and
  54. kerns). The format of this number is four bits representing the
  55. signed integer number and 12 bits representing the fractional part.
  56. So, for example, the hex integer FF71 unpacks to -0.035 decimal.
  57. Apple FOND units can range from -8.000 to 8.000. In common parlance
  58. 1.000 is used refer to the em-square, so most FOND values will fall
  59. within the range of -1.000 to 1.000. (Why is that so?: The Mac
  60. toolbox multiplies the FOND unit times the point size used to get the
  61. actual numbers to feed to QuickDraw; the FOND unit expresses font
  62. metrics for a hypothetical 1 point type size).
  63.  
  64. Fixed: For PostScript, Adobe uses a format called 'Fixed', which is
  65. the same as the Apple data type 'Fixed', itself frequently used in
  66. QuickDraw. A Fixed is a four-byte long integer, with the most
  67. significant 16 bits representing the signed integer and the remaining
  68. 16 bits representing the fraction. Fixed units can therefore range
  69. from -32768.000000 to 32768.000000.
  70.  
  71. Fract: The Fract is another Apple number format used for QuickDraw. A
  72. Fract is a four-byte long integer, with the most significant 2 bits
  73. representing the signed integer and the remaining 30 bits
  74. representing the fraction. Fracts can range from -2.000000000 to
  75. 2.000000000.
  76.  
  77. Because these number formats are so easy to confuse, Hex Key displays
  78. their scope at startup.
  79.  
  80.  
  81. Who needs it...?
  82.  
  83. If you need it, you know. If you spend a lot of time staring
  84. glassy-eyed at FONDs in ResEdit, you need it. If you read a lot of
  85. PostScript, you need it. If you need to compare KernEdit numbers to
  86. their hex equivalents, you need it. If none of this means anything to
  87. you, you don't need it (grin).
  88.  
  89.  
  90. Very Best,
  91.  
  92. Greg Swann
  93. 8/1/98
  94.